package com.hh.game.service.gateway.webscoket.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleUserEventChannelHandler;
import io.netty.handler.timeout.IdleStateEvent;

public class WebSocketEventChannelHandler extends SimpleUserEventChannelHandler<IdleStateEvent> {
    @Override
    protected void eventReceived(ChannelHandlerContext channelHandlerContext, IdleStateEvent idleStateEvent) throws Exception {
        switch (idleStateEvent.state()) {
            case READER_IDLE:
                break;
            case WRITER_IDLE:
                System.out.println("write idle");
                break;
            case ALL_IDLE:
                System.out.println("all idle");
                break;
            default:
                break;
        }
    }
}
